/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * pAddNewProductInput.java
 *
 * Created on Mar 4, 2011, 12:37:12 PM
 */

package com.fa.supporters;

/**
 *
 * @author tatung
 */
public class pAddNewProductInput extends javax.swing.JPanel {

    /** Creates new form pAddNewProductInput */
    public pAddNewProductInput() {
        initComponents();
    }

    public String getInProductName(){
        return txtInProductName.getText();
    }

    public String getOutProductName(){
        return txtOutProductName.getText();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        txtInProductName = new javax.swing.JTextField();
        txtOutProductName = new javax.swing.JTextField();

        jLabel1.setText(org.openide.util.NbBundle.getMessage(pAddNewProductInput.class, "pAddNewProductInput.jLabel1.text")); // NOI18N

        jLabel2.setText(org.openide.util.NbBundle.getMessage(pAddNewProductInput.class, "pAddNewProductInput.jLabel2.text")); // NOI18N

        txtInProductName.setText(org.openide.util.NbBundle.getMessage(pAddNewProductInput.class, "pAddNewProductInput.txtInProductName.text")); // NOI18N
        txtInProductName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtInProductNameActionPerformed(evt);
            }
        });

        txtOutProductName.setText(org.openide.util.NbBundle.getMessage(pAddNewProductInput.class, "pAddNewProductInput.txtOutProductName.text")); // NOI18N
        txtOutProductName.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtOutProductNameFocusGained(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtOutProductName, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
                    .addComponent(txtInProductName, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(txtInProductName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(txtOutProductName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void txtInProductNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtInProductNameActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtInProductNameActionPerformed

    private void txtOutProductNameFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtOutProductNameFocusGained
        // TODO add your handling code here:
        this.txtOutProductName.setText(txtInProductName.getText());
    }//GEN-LAST:event_txtOutProductNameFocusGained


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JTextField txtInProductName;
    private javax.swing.JTextField txtOutProductName;
    // End of variables declaration//GEN-END:variables

}
